import { BaseController, CoolController, CoolUrlTag, TagTypes } from '@cool-midway/core'
import { BannerInfoEntity } from '../../entity/info'

@CoolController({
  api: ['list'],
  entity: BannerInfoEntity,
  listQueryOp: {
    keyWordLikeFields: ['name'],
    fieldEq: ['status'],
    where: async () => {
      return [
        ['a.status = :status', { status: 1 }],
      ]
    },
  },
})
@CoolUrlTag({
  key: TagTypes.IGNORE_TOKEN,
  value: ['list'],
})
export class AdminBannerInfoController extends BaseController { }
